/*!
 * Copyright (c) 2020 the original author or authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

/* You can add global styles to this file, and also import other style files */
@import 'media.scss';
@import 'colors.scss';

body,
html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Roboto, "Helvetica Neue", sans-serif;

  h3 {
    font-weight: 400;
    margin-top: 0;
    font-family: Roboto Regular, "Helvetica Neue", sans-serif;
  }

  h4 {
    font-family: Roboto Regular, "Helvetica Neue", sans-serif;
  }
}

.container {
  width: 100%;
  padding-right: 16px;
  padding-left: 16px;
  margin-right: auto;
  margin-left: auto;
  flex-wrap: wrap;
}

mat-card {
  box-sizing: border-box;
  font-family: Roboto Regular, "Helvetica Neue", sans-serif;
}



.mat-raised-button {
  &.mat-primary {
    background-color: $primary;

    &:hover {
      background-color: $primary-light;
    }
  }
}

.mat-flat-button {
  &.mat-accent {
    background-color: $green;
  }

  &:hover {
    background-color: lighten($green, 10%);
  }
}

.btn-block {
  width: 100%;

  .mat-table {
    .mat-row {
      height: 58px;
    }
  }
}

app-table, app-user-table, app-model-table {
  overflow-y: auto;
  display: block;
  min-height: 425px;
  height: 425px;
  margin-bottom: 50px;
}

@include mobile {
  .container {
    max-width: 540px;
  }

  .mat-column-apiKey.mat-cell {
    max-width: $short-apiKey-length;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@include tablet-portrait {
  .container {
    max-width: 720px;
  }
}

@include tablet-landscape {
  .container {
    max-width: 960px;
  }
}

@include desktop {
  .container {
    max-width: 1140px;
  }
}

.app-table {
  table {
    width: 100%;

    th {
      font-size: 15px;
      color: black;
      font-weight: 600;
    }

    .mat-header-cell {
      font-family: Roboto Regular, "Helvetica Neue", sans-serif;
    }

    .mat-form-field {
      width: 80%;
    }
  }
}

.app-page {
  height: auto;
  margin-bottom: 60px;

  .card-single-action-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
  }
}

.test-model-page {
  height: auto;
  margin-bottom: 60px;
  overflow-y: hidden;
}

.mat-form-field-type-mat-select .mat-form-field-underline {
  display: none;
}

.mat-select-arrow {
  color: black;
}

.mat-button.mat-primary,
.mat-icon-button.mat-primary,
.mat-stroked-button.mat-primary {
  color: $accent;
}

.mat-button.mat-primary[disabled],
.mat-icon-button.mat-primary[disabled] {
  color: $disabled;
}

.mat-form-field-appearance-legacy {
  .mat-hint,
  .mat-error {
    font-size: 12px;
  }

  .mat-hint,
  .mat-form-field-label {
    color: $secondaryText;
  }

  .mat-form-field-underline {
    background-color: $disabled;
  }
}

.mat-input-element {
  color: $primaryText !important;
  font-size: 16px !important;
  caret-color: $accent;
}

.mat-form-field {
  .mat-form-field-label {
    color: $secondaryText;
  }

  &.mat-form-field-invalid {
    .mat-input-element {
      caret-color: $red;
    }

    .mat-form-field-ripple {
      background-color: $red;
    }

    .mat-form-field-label {
      color: $red;
    }
  }

  &.mat-focused {
    .mat-form-field-ripple {
      background-color: $accent;
    }

    .mat-form-field-label {
      color: $accent;
    }
  }
}

.mat-error {
  color: $red;
}

.separate-line {
  border: 1px solid $normal-gray;
  margin: 30px 0;
}
